package com.dfdchem.imd.kaiwu.activity;

import android.content.Context;
import android.webkit.JavascriptInterface;
import android.widget.Toast;

public class JavaObject {
    private Context context;

    public JavaObject(Context context)
    {
        this.context = context;
    }

    @JavascriptInterface
    public String toast(String text)
    {
        Toast.makeText(context,text,Toast.LENGTH_SHORT).show();
        return "我是JAVA 返回的数据";
    }

    public void cannotCall()
    {
        Toast.makeText(context,"这是一个不能调用的方法",Toast.LENGTH_SHORT).show();
    }
}
